#include <stdio.h>
#include <stdlib.h>
#include "bonc.h"

typedef void(F_MYPRINT);

void MyPrint(int pp[])
{
    int index;
    for (index = 0; index < 26; ++index)
    {
        bonc_print_in("%c:%d", 'a' + index, pp[index]);
    }
}

void fun(char *tt,int pp[],F_MYPRINT *myprint)
{
	char let;
	char *p = tt;
	int index;
	for(index = 0; index < 26; ++index)
	{
		pp[index] = 0;
	}
	while(let = *p++)
	{
		pp[let - 'a']++;
	}	
	MyPrint(pp);

	return;
}
int main()
{
    char *str = "sfajfafjkdfklvxkfskaf";
    int array[26] = {0};
    fun(str, array, MyPrint);

    return 0;
}
